package com.yn.front.zy;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yn.common.model.zy.TDeviceInfoDO;
import com.yn.common.page.BasePage;
import com.yn.common.request.zyorder.ZyDeviceRentOrderRequest;
import com.yn.common.response.sc.BaseResult;
import com.yn.service.zy.DeviceRentOrderService;
import com.yn.service.zy.TDeviceInfoService;
import com.yn.service.zy.model.dto.TDeviceInfoDTO;
import com.yn.service.zy.model.query.TDeviceInfoQuery;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import javax.validation.constraints.NotNull;

@RestController
@RequestMapping("api/rent")
@Api(tags = "设备租赁相关接口")
public class TDeviceRentOrderController {
    @Autowired
    private DeviceRentOrderService  deviceRentOrderService;

    /**
     * 提交设备租聘信息
     * @param request
     * @return
     */
    @GetMapping("/提交设备租聘信息")
    @ApiOperation("提交设备租聘信息")
    public BaseResult<String> save(@RequestBody @Validated ZyDeviceRentOrderRequest request){

        String saveOrder = deviceRentOrderService.saveOrder(request);
        return BaseResult.success(saveOrder);
    }





}
